package com.gqz.equip.app.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


/**
 * 新能源-物资-出入库工单表
 *
 * @author gqz20
 * @date 2023/02/25
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("T_EN_WZ_EQUIP_BQ")
public class EnWzEquipBqEntity implements Serializable {

    /**
     * 主键
     */
    @TableId
    private String id;

    /**
     * 设备编码
     */
    @TableField(value = "SBBM")
    private String sbbm;

    /**
     * 贴签人
     */
    @TableField(value = "TQR_ID")
    private String tqrId;
    /**
     * 贴签人
     */
    @TableField(value = "TQR_NAME")
    private String tqrName;

    /**
     * 贴签时间
     */
    @TableField(value = "TQ_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "tqTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date tqTime;

    /**
     * 全局照片
     */
    @TableField(value = "QJZP")
    private String qjzp;

    /**
     * 二维码照片
     */
    @TableField(value = "EWMZP")
    private String ewmzp;

    /**
     * 审核状态
     */
    @TableField(value = "SHZTBM")
    private String shztbm;

    /**
     * 审核意见
     */
    @TableField(value = "SHYJ")
    private String shyj;

    /**
     * 审核人
     */
    @TableField(value = "SH_PERSON")
    private String shPerson;

    /**
     * 审核时间
     */
    @TableField(value = "SH_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "shTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date shTime;

    /**
     * 审核状态名称
     */
    @TableField(value = "SHZTMC")
    private String shztmc;

    /**
     * 是否删除 0否 1 是
     */
    @TableField(value = "IS_DEL")
    private String isDel;

    /**
     * 创建时间
     */
    @TableField(value = "CREATE_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "createTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 是否贴签 0否1是
     */
    @TableField(value = "IS_TQ")
    private String isTq;

    /**
     * 设备类型编码
     */
    @TableField(value = "SBLX_CODE")
    private String sblxCode;

    /**
     * 设备类型名称
     */
    @TableField(value = "SBLX_NAME")
    private String sblxName;

    /**
     * 设备坐标
     */
    @TableField(value = "ZB")
    private String zb;
    /**
     * 地理位置
     */
    @TableField(value = "DLWZ")
    private String dlwz;

    /**
     * start这个是必须要的动态条件集合start   start
     */
    private static Map<String, SFunction<EnWzEquipBqEntity, ?>> map;

    static {
        map = new HashMap<>();
        map.put("id", EnWzEquipBqEntity::getId);
        map.put("sbbm", EnWzEquipBqEntity::getSbbm);
        map.put("tqrId", EnWzEquipBqEntity::getTqrId);
        map.put("tqrName", EnWzEquipBqEntity::getTqrName);
        map.put("zb", EnWzEquipBqEntity::getZb);
        map.put("dlwz", EnWzEquipBqEntity::getDlwz);
        map.put("tqTime", EnWzEquipBqEntity::getTqTime);
        map.put("qjzp", EnWzEquipBqEntity::getQjzp);
        map.put("ewmzp", EnWzEquipBqEntity::getEwmzp);
        map.put("shztbm", EnWzEquipBqEntity::getShztbm);
        map.put("shyj", EnWzEquipBqEntity::getShyj);
        map.put("shPerson", EnWzEquipBqEntity::getShPerson);
        map.put("shTime", EnWzEquipBqEntity::getShTime);
        map.put("shztmc", EnWzEquipBqEntity::getShztmc);
        map.put("isDel", EnWzEquipBqEntity::getIsDel);
        map.put("createTime", EnWzEquipBqEntity::getCreateTime);
        map.put("isTq", EnWzEquipBqEntity::getIsTq);
        map.put("sblxCode", EnWzEquipBqEntity::getSblxCode);
        map.put("sblxName", EnWzEquipBqEntity::getSblxName);

    }

    public static SFunction<EnWzEquipBqEntity, ?> genColumnSFunction(String column) {
        return map.get(column);
    }
    /** end这个是必须要的动态条件集合end   end */


}
